<html>
<head><meta charset="utf-8"><title>IDs everywhere · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html">IDs everywhere</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="177178005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177178005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177178005">(Oct 02 2019 at 18:23)</a>:</h4>
<p>what do the various IDs of the compiler represent, and how are they related?</p>



<a name="177178091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177178091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177178091">(Oct 02 2019 at 18:24)</a>:</h4>
<p>there is <code>NodeId</code>, <code>DefId</code>, <code>LocalItemId</code>, and many more...</p>



<a name="177178125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177178125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177178125">(Oct 02 2019 at 18:24)</a>:</h4>
<p>but by far  the most prevalent type of ID is <code>DefId</code></p>



<a name="177182907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177182907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tshepang Lekhonkhobe <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177182907">(Oct 02 2019 at 19:18)</a>:</h4>
<p>some of that is explained <a href="https://rust-lang.github.io/rustc-guide/hir.html#identifiers-in-the-hir" target="_blank" title="https://rust-lang.github.io/rustc-guide/hir.html#identifiers-in-the-hir">https://rust-lang.github.io/rustc-guide/hir.html#identifiers-in-the-hir</a></p>



<a name="177183090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177183090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Tshepang Lekhonkhobe <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177183090">(Oct 02 2019 at 19:20)</a>:</h4>
<p>only one not explained is <code>LocalitemId</code>... where did you see it?</p>



<a name="177186810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177186810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177186810">(Oct 02 2019 at 20:03)</a>:</h4>
<p>so i misremembered, it's called <code>ItemLocalId</code></p>



<a name="177187363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177187363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177187363">(Oct 02 2019 at 20:08)</a>:</h4>
<p>so the other question i have is, how are they generated?</p>



<a name="177187399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177187399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177187399">(Oct 02 2019 at 20:08)</a>:</h4>
<p>i know how <code>NodeId</code>s are generated -- they're done by the Resolver after macro expansion</p>



<a name="177187424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/IDs%20everywhere/near/177187424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Keith Yeung <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/IDs.20everywhere.html#177187424">(Oct 02 2019 at 20:09)</a>:</h4>
<p>the <code>DefId</code> sounds like a very key component that i have to know</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>